﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Theme/MasterPage.master" AutoEventWireup="true"
    Inherits="_Test" CodeBehind="Default.aspx.cs" %>
<%@ Register Assembly="Xentrix" Namespace="Xentrix" TagPrefix="Xen" %>
<%@ Register Src="Modals/Asset_Modal/Asset_Modal.ascx" TagName="Asset_Modal" TagPrefix="uc1" %>
<%@ Register Src="Modals/Audit_Modal/Modal_Audit.ascx" TagName="Modal_Audit" TagPrefix="uc2" %>
<asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolderMain" runat="Server">
    <script type="text/javascript">
        
    </script>
    <%--  <div>
        <asp:TextBox ID="TextBoxAssetNumber" runat="server"></asp:TextBox>
        <asp:Button ID="ButtonTest" OnClick="ButtonTest_Click" runat="server" Text="Load" />
    </div>--%>
    <uc1:Asset_Modal ID="Asset_Modal1" runat="server" />
    <uc2:Modal_Audit ID="Modal_Audit1" runat="server" />
    <div id="SearchBoxContainer">
        <div id="TextBoxSearchContainer">
            <asp:TextBox ID="TextBoxSearchAsset" runat="server" Width="300px"></asp:TextBox>
            <asp:Button ID="ButtonSearch" Text="Search" runat="server" OnClick="ButtonSearch_Click"
                CssClass="ButtonDefault" />
        </div>
        <div id="NewAssetButtonContainer">
            <asp:Button ID="ButtonNewAsset" runat="server" Text="New Asset" OnClick="ButtonNewAsset_Click"
                CssClass="ButtonDefault" />
        </div>
    </div>
    <div id="SearchLabelDisplay">
        <asp:Label ID="LabelSearchDisplay" runat="server" Text=""></asp:Label>
    </div>
    <%--<div id="FilterBoxContainer">
        <div class="FilterOption">
            <asp:DropDownList ID="DropDownList1" runat="server">
            </asp:DropDownList>
        </div>
        <div class="FilterOption">
            <asp:DropDownList ID="DropDownList2" runat="server">
            </asp:DropDownList>
        </div>
        <div class="FilterOption">
            <asp:DropDownList ID="DropDownList3" runat="server">
            </asp:DropDownList>
        </div>
        <div class="FilterOption">
            <asp:Button ID="ButtonClearFilters" runat="server" Text="Remove filters" />
        </div>
    </div>--%>
    <div id="SearchResultsContainer">
        <asp:GridView ID="GridViewSearchResults" runat="server" CellPadding="4" AutoGenerateColumns="False"
            ForeColor="#333333" GridLines="None" AllowPaging="True" AllowSorting="True" PageSize="20"
            DataKeyNames="ID" OnPageIndexChanging="GridViewSearchResults_PageIndexChanging"
            OnSorting="GridViewSearchResults_OnSorting">
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#55517B" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F8FAFA" />
            <SortedAscendingHeaderStyle BackColor="#246B61" />
            <SortedDescendingCellStyle BackColor="#D4DFE1" />
            <SortedDescendingHeaderStyle BackColor="#15524A" />
            <Columns>
                <asp:BoundField HeaderText="ID" SortExpression="ID" DataField="ID" ItemStyle-Width="100px"/>
                <asp:BoundField HeaderText="Display Name" SortExpression="DisplayName" DataField="DisplayName" ItemStyle-Width="200px"/>
                <asp:BoundField HeaderText="Asset Label" SortExpression="AssetLabel" DataField="AssetLabel" ItemStyle-Width="100px" />
                <asp:BoundField HeaderText="Serial Number" SortExpression="SerialNumber" DataField="SerialNumber" ItemStyle-Width="100px"/>
                <asp:BoundField HeaderText="Description" SortExpression="AssetDescription" DataField="AssetDescription" ItemStyle-Width="200px"/>
                <asp:TemplateField HeaderText="Details" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButtonEditAsset" runat="server" OnClick="GridViewSearchResultsCommandControls"
                            CommandName="EditAsset" src="/corewebappimages/Transparent%20Background/Xentrix-Transparent-Information-Grey.png" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButtonDeleteAsset" runat="server" OnClick="GridViewSearchResultsCommandControls"
                            CommandName="DeleteAsset" src="/corewebappimages/Transparent%20Background/Xentrix-Transparent-Delete.png"
                            OnClientClick="return confirm('Are you sure you want to delete this asset?')" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>
